<template>
  <div>
    <h1>我是子组件</h1>
     <p>{{ X }}</p>
  </div>
</template>

<script setup>
    import { ref, reactive, toRefs, onBeforeMount, onMounted, watchEffect, computed } from 'vue';
    import { useStore } from 'vuex';
    let store = useStore()

    let X = ref('');
    X.value = computed(()=>store.state.getData);
</script>
<style scoped>
    
</style>